package com.ruoyi.project.system.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysCheck;
import com.ruoyi.project.system.domain.SysPost;
import com.ruoyi.project.system.service.SysCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;



import java.util.List;

@Controller
@RequestMapping("/system/check")
public class SysCheckController extends BaseController {

    @Autowired
    private SysCheckService sysCheckService;

    @PreAuthorize("@ss.hasPermi('system:check:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysCheck check)
    {
        startPage();
        List<SysCheck> list = sysCheckService.selectCheckList(check);
        System.out.println(list.toString());
        return getDataTable(list);
    }

/*    @PreAuthorize("@ss.hasPermi('system:check:query')")
    @GetMapping(value = "/{checkItemID}")
    public AjaxResult getInfo(@PathVariable Long checkItemID)
    {
        return AjaxResult.success(postService.selectPostById(postId));
    }*/
}
